package com.hulk.ratel.manage.commoncache;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.google.common.collect.Lists;
import com.hulk.ratel.common.constant.enums.BussErrCode;
import com.hulk.ratel.common.constant.enums.ErrFlag;
import com.hulk.ratel.common.constant.enums.UseFlag;
import com.hulk.ratel.manage.commonutil.bo.ErrcodeConvertBO;
import lombok.extern.slf4j.Slf4j;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by cmt on 2017/11/22.
 * 【参数信息】机构合作方应答码转换表
 */
@Slf4j
@Component
public class ErrCodeConvertCache {

   

    /**
     * 查询机构合作方应答码转换
     *
     * @param platformId
     * @param upOrgCode
     * @param respCode
     * @return
     */
    @Cacheable(value = "errCodeConvertCache", key = "#upOrgCode +#respCode + 'ErrCodeConvertCache_findErrCodeConvert'")
    public List<ErrcodeConvertBO> findErrCodeConvert(String platformId, String upOrgCode, String respCode) {
        ErrcodeConvertBO param = new ErrcodeConvertBO();
         //TODO
        param.setRespCode(BussErrCode.S_000000.getErrCode());
        param.setRespCode(BussErrCode.S_000000.getErrDesc());
        param.setErrFlag(ErrFlag.Y.getValue());
        param.setUseFlag(UseFlag.Y.getValue());
        List<ErrcodeConvertBO> errodeList = Lists.newArrayList();
        errodeList.add(param);
        return errodeList;
    }
}
